
#include <iostream> // std::cout
#include <queue>    // std::queue
#include <unistd.h> // sleep

int main()
{
    std::queue<int> myqueue;
    for (int i = 0; i < 100; i++)
    {
        myqueue.push(i);
    }

    while (true)
    {
        if (myqueue.empty())
        {
            break;
        }
        std::cout << "myqueue.front() is now " << myqueue.front() << std::endl;
        myqueue.pop();
        sleep(0.1);
    }
    return 0;
}

